/**
* Copyright (c) 2016-2100 yunclouds
*/
package com.yunqian.web;

import com.yunqian.redot.domain.Ticket;
import com.yunqian.redot.service.TicketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * Describe: 门票管理控制器
 *
 * @author zsy
 * 2018-09-29 15:55:11
 */
 @RestController
 @RequestMapping("/api/ticket")
public class TicketController {

     @Autowired
     private TicketService ticketService;

     /**
     * 门票列表
     *
     * @return
     */
    @GetMapping("/all")
    public Map<String, Object> list() {
        List<Ticket> ticketList = ticketService.findAllByStatus();
        Map<String, Object> map = new HashMap<>(16);
        map.put("ticketList", ticketList);
        return map;
    }

}
